//
//  BaseTableViewController.h
//  KutulusLaw
//
//  Created by Mahmood1 on 12/9/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "KBaseSearchFileDAO.h"
#import "CCommon.h"
#import "KBaseSearchCommandDTO.h"
#import "KBaseResponedSearchCommandDTO.h"
#import "KSearchFileCellFactory.h"
#import "PullToRefreshView.h"
#import "MBProgressHUD.h"

@interface BaseTableViewController : UIViewController <UITableViewDataSource,UITableViewDelegate,UISearchBarDelegate, SearchFileCellDelegate, PullToRefreshViewDelegate, UIDocumentInteractionControllerDelegate, UISearchBarDelegate> {
    UISearchBar						*mySearchBar;
    UILabel							*_titleView;
	KBaseSearchFileDAO				*_searchFileDAO;
	KBaseSearchCommandDTO			*_searchCommandDTO;
	KBaseResponedSearchCommandDTO	*_ResponsedSearch;
	KSearchFileCellFactory			*_cellFactory;
	NSUInteger						_pageNumber;
	NSInteger						_rowNumberPerPage;
	PullToRefreshView				*_pullToRefresh;
	BOOL							_isPullToRefreshing;
	BOOL							_isEndedLoadMore;
	BOOL							_isLoadingMore;
	UIActivityIndicatorView			*activityLoading;
	MBProgressHUD					*_progressHUD;
	UIDocumentInteractionController *controller;
	UIButton						*_cancelDownloadButton;
	AFHTTPRequestOperation *_operation;
}
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (strong, nonatomic) UILabel *titleView;
- (void)initControl;
- (void)initializeFactory;
- (void)touchSearchButton:(id)sender;
- (BOOL) searchFile;
- (BOOL) loadMoreSearchFile;
- (void) handleInvalidSession;
@end
